<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <div class="alert alert-warning-light">
        文件上传请注意大小，小程序端需要解析文件，如果文件过大，可能会出现解析时间过长的情况
    </div>



    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">分类名称:</label>
        <div class="col-xs-12 col-sm-8">

                <select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[cate_id]">
                    {foreach name="parentList" item="vo"}
                        <option data-type="{$vo.type}" value="{$key}" {in name="key" value=""}selected{/in}>{$vo.name}</option>
                    {/foreach}
                </select>

         <!--   <div class="radio">
                <label for="row[catename]-normal">
                    <input id="row[catename]-normal" checked="checked" name="row[catename]" type="radio" value="维修教程"> 维修教程
                </label>
                <label for="row[catename]-hidden">
                    <input id="row[catename]-hidden" name="row[catename]" type="radio" value="故障案例"> 故障案例</label>
            </div>-->
        </div>
    </div>

    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">标题:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
        </div>
    </div>

    <div class="form-group">
        <label for="c-local" class="control-label col-xs-12 col-sm-2">上传文件:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="row[url]" id="c-local" class="form-control" value=""/>
        </div>
        <div class="col-xs-12 col-sm-3" style="margin-left: 16.6%; margin-top: 15px;">
            <button id="plupload-local" class="btn btn-primary plupload" data-input-id="c-local"  data-url="{:url('ajax/upload')}"><i class="fa fa-upload"></i> 选择文件</button>
        </div>
    </div>


    <div class="form-group">
        <label for="c-editor" class="control-label col-xs-12 col-sm-2">详情:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea name="row[content]" id="c-editor" cols="60" rows="5" class="form-control editor"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
        </div>
    </div>



    <div class="form-group hidden layer-footer">
        <div class="col-xs-2"></div>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
